calendar Property |
String that denotes the unique identifier of the element that contains the calendar behavior.
Syntax
HTML |
<ELEMENT id=elementID fieldType=fieldType calendar=scalendarID...>...</ELEMENT> |
Scripting |
elementID.calendar [ =scalendarID ] |
Parameters
Parameter |
Description |
---|---|
scalendarID |
String that denotes the unique identifier of the calendar behavior that is defined in the page. |
Remarks
The calendar component and the validate component can be made to work together by mentioning this property to the element. Once this is done, then opening of calendar control and displaying of values will be automatically done by the validate control itself.
A validate attached to calendar component provides lot of flexibility in displaying and validating the data present in the element to which it is attached. It can even be used to display the date in various formats.
Example
The following example shows how the calendar component can be attached to the INPUT box which has a reference to the validate component using calendar property.
//calendar definition inside the BODY <div cordysType="wcp.library.util.Validate" calendar id="cal" ></div> //validate definition inside the BODY <div cordysType="wcp.library.ui.Calendar" id="cal" showTitle="false" showInputBox="false" style="position:absolute;display:none;width:150;height:137;"></div> //INPUT box refering to calendar and validate <input type="text" fieldType="date" calendar="cal" displayFormat="MM/DD/YYYY">